bitkeeper revision 1.1159.187.33 (41ab10f0GLXR1qCvGRT8TTbIpm5j7A)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Mon, 29 Nov 2004 12:07:12 +0000 (12:07 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Mon, 29 Nov 2004 12:07:12 +0000 (12:07 +0000)
Fix ioremap() to only expect the lowmem ISA region to be fixmap()ed
in privileged builds.

linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c

index 1273a9a1aa432a33fba158a8cd834a3209cbce30..7cec83afd653343a030f9f6b1270bb2050af26e8 100644 (file)
@@ -154,11 +154,13 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
        if (!size || last_addr < phys_addr)
                return NULL;
 
+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
        /*
         * Don't remap the low PCI/ISA area, it's always mapped..
         */
        if (phys_addr >= 0x0 && last_addr < 0x100000)
                return isa_bus_to_virt(phys_addr);
+#endif
 
        /*
         * Don't allow anybody to remap normal RAM that we're using..
@@ -287,11 +289,13 @@ void __init *bt_ioremap(unsigned long phys_addr, unsigned long size)
        if (!size || last_addr < phys_addr)
                return NULL;
 
+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
        /*
         * Don't remap the low PCI/ISA area, it's always mapped..
         */
        if (phys_addr >= 0x0 && last_addr < 0x100000)
                return isa_bus_to_virt(phys_addr);
+#endif
 
        /*
         * Mappings have to be page-aligned